<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>02_为什么要学习原型对象</title>
    </head>
    <body>
        <script>
            function Villa(vStyle,vPrice){
                this.vStyle = vStyle;
                this.vPrice = vPrice;
                this.live = function(){
                    console.log('住着很舒服，买一个台球桌');
                }
            }

            var v1 = new Villa('新中式',500);
            var v2 = new Villa('欧式',800);
            console.log(v1.live == v2.live);

            // -----------------------------------------------


            var arr = new Array(1,2,3,4);
            var arr1 = new Array(2,2,4,5);
            console.log(arr.push == arr1.push);



            // var arr2 = new Array(2,2,4,5);
            // arr2.push();


            // var arr3 = new Array(2,2,4,5);
            // arr3.push();

            // var arr4 = new Array(2,2,4,5);
            // arr4.push();

            
        </script>
    </body>
</html>